Skip to content

Use cryptographically secure boundaries for multipart file uploads - #1898

Merged
xavdid merged 4 commits into
masterfrom
RUN_DEVSDK-2807
Aug 31, 2026
Merged

Use cryptographically secure boundaries for multipart file uploads#1898
xavdid merged 4 commits into
masterfrom
RUN_DEVSDK-2807

Conversation

@xavdid

@xavdid xavdid commented Aug 29, 2026

Copy link
Copy Markdown
Member

Why?

Fixes a bug where the boundary markers in multi-part file uploads weren't cryptographically secure. As a result, it could be possible for an attacker-controlled file to specify additional properties in the upload request.

Similarly, a maliciously crafted filename could be used to add additional properties to the request.

This only affects the files.create method.

What?

  • use a cryptographically secure method of generating multipart file boundaries
  • sanitize filename input before adding to requests
  • add tests

See Also

@xavdid
xavdid requested a review from a team as a code owner August 29, 2026 01:08
@xavdid
xavdid requested review from justiny-stripe and removed request for a team August 29, 2026 01:08
@xavdid
xavdid enabled auto-merge (squash) August 29, 2026 01:08
@xavdid
xavdid requested a review from jar-stripe August 31, 2026 18:00

@jar-stripe jar-stripe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@xavdid
xavdid merged commit 5231afb into master Aug 31, 2026
18 checks passed
@xavdid
xavdid deleted the RUN_DEVSDK-2807 branch August 31, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants